package com.capacity.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.capacity.mapper.CscOrderInfoMapper;
import com.capacity.domain.CscOrderInfo;
import com.capacity.service.ICscOrderInfoService;

/**
 * 订单信息Service业务层处理
 * 
 * @author 李广
 * @date 2024-01-31
 */
@Service
public class CscOrderInfoServiceImpl implements ICscOrderInfoService 
{
    @Autowired
    private CscOrderInfoMapper cscOrderInfoMapper;

    /**
     * 查询订单信息
     * 
     * @param id 订单信息主键
     * @return 订单信息
     */
    @Override
    public CscOrderInfo selectCscOrderInfoById(Long id)
    {
        return cscOrderInfoMapper.selectCscOrderInfoById(id);
    }

    /**
     * 查询订单信息列表
     * 
     * @param cscOrderInfo 订单信息
     * @return 订单信息
     */
    @Override
    public List<CscOrderInfo> selectCscOrderInfoList(CscOrderInfo cscOrderInfo)
    {
        return cscOrderInfoMapper.selectCscOrderInfoList(cscOrderInfo);
    }

    /**
     * 新增订单信息
     * 
     * @param cscOrderInfo 订单信息
     * @return 结果
     */
    @Override
    public int insertCscOrderInfo(CscOrderInfo cscOrderInfo)
    {
        cscOrderInfo.setCreateTime(DateUtils.getNowDate());
        return cscOrderInfoMapper.insertCscOrderInfo(cscOrderInfo);
    }

    /**
     * 修改订单信息
     * 
     * @param cscOrderInfo 订单信息
     * @return 结果
     */
    @Override
    public int updateCscOrderInfo(CscOrderInfo cscOrderInfo)
    {
        cscOrderInfo.setUpdateTime(DateUtils.getNowDate());
        return cscOrderInfoMapper.updateCscOrderInfo(cscOrderInfo);
    }

    /**
     * 批量删除订单信息
     * 
     * @param ids 需要删除的订单信息主键
     * @return 结果
     */
    @Override
    public int deleteCscOrderInfoByIds(Long[] ids)
    {
        return cscOrderInfoMapper.deleteCscOrderInfoByIds(ids);
    }

    /**
     * 删除订单信息信息
     * 
     * @param id 订单信息主键
     * @return 结果
     */
    @Override
    public int deleteCscOrderInfoById(Long id)
    {
        return cscOrderInfoMapper.deleteCscOrderInfoById(id);
    }
}
